-
-
Notifications
You must be signed in to change notification settings - Fork 236
Refactor Value::Array and add Value::Enum #1004
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Still need to work on SeaORM to tweak the Enum design. |
## PR Info - Closes #69 ## New Features - [ ] Provide a new type `RangeType` to implement Postgres range type - [ ] Provide range type as an element type of Postgres Array ## Doubts - [ ] Not sure where to implement `hashable-value` features. I put that in the `with_range.rs` - [ ] It implements time ranges with Chrono and Time I left out Jiff now - [ ] Not sure how it plays together with `with-json` - [ ] How to make RangeType from std Rust types (tuple, std range, how to describe exclusive and inclusive bounds?) - [ ] A refactor PR is going on which may affect this branch (#1004) --------- Co-authored-by: Chris Tsang <[email protected]>
tyt2y3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you. this is longer than I can dissect in one go, but looks good in general
| } | ||
|
|
||
| // If bigdecimal is enabled and its size is larger, we make the limit to be bigdecimal's size | ||
| #[cfg(feature = "with-bigdecimal")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to disable bigdecimal by default in sea-orm
e05f1c9 to
1fffd2a
Compare
must be a problem with feature flags? |
1fffd2a to
0bcd031
Compare
0bcd031 to
69180f5
Compare
|
@Expurple Which do you prefer? Arrry::Type(Option(...)) or Array::Null(ArrayType) |
|
I'd say |
| #[derive(Debug, Clone)] | ||
| #[cfg_attr(not(feature = "hashable-value"), derive(PartialEq))] | ||
| #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
| #[non_exhaustive] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't have to be non_exhaustive I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value is non_exhaustive, so this should also be non_exhaustive.
Changes:
ARRAY[instead ofARRAY [to match SQL conventions